<%- partial('../sidebar') %>

<div id='content'>
  <div class='panel'>
    <div class='header'>
      <ul class='breadcrumb'>
        <li><a href='/'>主页</a><span class='divider'>/</span></li>
        <li class='active'>账号查询</li>
      </ul>
    </div>
    <div class='inner'>
      <% if(typeof(users) !== 'undefined' && users.length > 0){ %>
      <table class='table table-condensed table-striped'>
        <thead>
          <th>#</th>
          <th>用户名</th>
          <th>角色</th>
          <th>部门</th>
          <th>手机</th>
          <th>职位</th>
          <th>主题数</th>
          <th>评论数</th>
          <th>状态</th>
          <th></th>
        </thead>
        <tbody>
        <%- partial('../usermanager/user_item',{collection:users,as:'user'}) %>
        </tbody>
      </table>
      <% }else{ %>
      <p>还没有用户</p>
      <% } %>
    </div>
  </div>
</div>
<script>
jQuery(function($){
  $('#content .btn-delete-user').click(function(e){
    var rz = confirm('确定删除该用户？');
    if (!rz) {
      e.preventDefault();
    } else {
      //make the ajax action
      $(this).parent().parent().remove();
    }
  });
});
</script>
